<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>通讯录</title>
</head>
<script type="text/javascript">
 function  _submit(){
              var files=document.getElementsByName("image");
              for(var i=0;i<files.length;i++){
                if(files[i].value==""){
                 alert("请选择一个班级");
                 return false;
                  }
              }  
           document.forms[0].submit(); 
}
</script >
<style type="text/css">
  .tishi{
   	color:#FF0000;
  }
 .froms{
    margin-top: 180px;
    font-size: 18px;
  }

</style>
<body bgcolor="#FFFFCC">
 <div class="froms" align="center">
 <form id="fileup" name="from1" action="U_Daying.action"  method="post">
                  选择班级<select name="classname">
           <option>请选择....</option>    
           <c:forEach var="classname" items="${classnames}">
              <option>${classname}</option> 
           </c:forEach>
           </select>
      <input type="button" value="生成word文档"  onclick="_submit()">
      <br /> <a href="<%=basePath%>/wordDOC/STUDENT.doc">${tishi}</a>
 </form>
 </div> 
</body>
</html>